<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Classe controller che si occupa dell'installazione/disinstallazione del
 * plugin
 *
 * @author andrea
 */
class CInstallation_cuspo extends Controller_cuspo{

    /**
     * Installa la parte del plugin relativa ai video
     */
    public function installConcorsi(){
        global $debug;
        $found = USingleton_cuspo::getInstances("FConcorsi_cuspo");
        $drop = $found->dropTable($found->getInstallationTableName());
        $create = $found->createQuery($found->getInstallationTableName(),$found->getInstallationFields());
        $found->executeQuery($drop);
        $found->executeQuery($create);
    }    
    
    
    /**
     * Installa la parte del plugin relativa ai video
     */
    public function installCorsi(){
        global $debug;
        $found = USingleton_cuspo::getInstances("FCorso_cuspo");
        $drop = $found->dropTable($found->getInstallationTableName());
        $create = $found->createQuery($found->getInstallationTableName(),$found->getInstallationFields());
        $found->executeQuery($drop);
        $found->executeQuery($create);
    }
    
    /**
     * Installa la parte del plugin relativa ai video
     */
    public function installServizi(){
        global $debug;
        $found = USingleton_cuspo::getInstances("FServizio_cuspo");
        $drop = $found->dropTable($found->getInstallationTableName());
        $create = $found->createQuery($found->getInstallationTableName(),$found->getInstallationFields());
        $found->executeQuery($drop);
        $found->executeQuery($create);
    }   
    /**
     * Installa la parte del plugin relativa ai video
     */
    public function installNews(){
        global $debug;
        $found = USingleton_cuspo::getInstances("FNews_cuspo");
        $drop = $found->dropTable($found->getInstallationTableName());
        $create = $found->createQuery($found->getInstallationTableName(),$found->getInstallationFields());
        $found->executeQuery($drop);
        $found->executeQuery($create);
    }   
    /**
     * Installa la parte del plugin relativa ai video
     */
    public function installLavori(){
        global $debug;
        $found = USingleton_cuspo::getInstances("FLavoro_cuspo");
        $drop = $found->dropTable($found->getInstallationTableName());
        $create = $found->createQuery($found->getInstallationTableName(),$found->getInstallationFields());
        $found->executeQuery($drop);
        $found->executeQuery($create);
    }   
    /**
     * Installa la parte del plugin relativa ai video
     */
    public function installFacebook(){
        global $debug;
        $found = USingleton_cuspo::getInstances("FFacebook_cuspo");
        $drop = $found->dropTable($found->getInstallationTableName());
        $create = $found->createQuery($found->getInstallationTableName(),$found->getInstallationFields());
        $found->executeQuery($drop);
        $found->executeQuery($create);
    }   
    
    
    public function installSliders(){
        global $debug;
        $found = USingleton_cuspo::getInstances("FSlider_cuspo");
        $drop = $found->dropTable($found->getInstallationTableName());
        $create = $found->createQuery($found->getInstallationTableName(),$found->getInstallationFields());
        echo $create;
        $found->executeQuery($drop);
        $found->executeQuery($create);
    }   
}

?>
